<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">保存1</button>
    <script>
      const btn = document.getElementById("btn");
      // （标准）事件处理函数绑定
      // on（前缀）click（事件名）
      btn.addEventListener(
        "click",
        function () {
          console.log(1);
        },
        {
          once: true,
        }
      );

      btn.addEventListener(
        "click",
        function () {
          console.log(2);
        },
        {
          once: true,
        }
      );

      btn.addEventListener(
        "click",
        function () {
          console.log(3);
        },
        {
          once: true,
        }
      );
    </script>
  </body>
</html>
